package com.oner365.test.tree.uias;

import java.io.Serializable;


public class UIASOrgVO implements Comparable<UIASOrgVO>, Serializable {
    /**
   * 
   */
  private static final long serialVersionUID = 1L;
    private String orgId;               // 机构编号 0
    private String orgName;             // 机构名称 1
    private String orgType;             // 机构类型 5
    private String description;         // 描述 6
    private String parentId;            // 父机构编号 7
    private String status;              // 机构状态 8
    private String updateTime;          // 最后更新时间 9
    private String orgPath;          // 隶属id路径

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getOrgType() {
        return orgType;
    }

    public void setOrgType(String orgType) {
        this.orgType = orgType;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
    
    

    public String getOrgPath() {
      return orgPath;
    }

    public void setOrgPath(String orgPath) {
      this.orgPath = orgPath;
    }

    @Override
    public int compareTo(UIASOrgVO orgVO) {
        // 机构编号不同的，按机构编号由小到大排序
        if (!orgId.equals(orgVO.orgId)) {
            return orgId.compareTo(orgVO.orgId);
        }

        // 机构编号相同的，按状态由大到小排序
        return orgVO.status.compareTo(status);
    }
}
